<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>zyOffice-tinymce5-示例</title>
    <link type="text/css" rel="Stylesheet" href="demo.css" />
    <link type="text/css" rel="Stylesheet" href="zyoffice/js/skygqbox.css" />
    <script type="text/javascript" src="zyoffice/js/json2.min.js" charset="utf-8"></script>
    <script type="text/javascript" src="zyoffice/js/jquery-1.4.min.js" charset="utf-8"></script>
	<script type="text/javascript" src="zyoffice/js/skygqbox.js" charset="utf-8"></script>
    <script type="text/javascript" src="zyoffice/js/w.js" charset="utf-8"></script>
	<script type="text/javascript" src="tinymce/tinymce.min.js"></script>
	<script type="text/javascript" src="demo.js" charset="utf-8"></script>
</head>
<body>
	<div style=" font-size:medium; line-height:130%;">
		<div id="demos"></div>
		<textarea id="txt">zyOffice与tinymce 5整合示例。</textarea>
	</div>	
	<!--创建TinyMCE控件-->
	<script language="javascript" type="text/javascript">
		var pos = window.location.href.lastIndexOf("/");
        var root = window.location.href.substr(0, pos + 1);
        var api = [root,"upload.php"].join("");
		zyOffice.getInstance({
            word:"http://localhost:13710/zyoffice/word/convert",
            wordExport:"http://localhost:13710/zyoffice/word/export",
			pdf:"http://localhost:13710/zyoffice/pdf/upload"			
        });//加载控件
        tinymce.init({
            selector: '#txt',
            //汉化,路径是自定义的，一般放在public或static里面，汉化文件要自己去下载
            //language_url: '/tinymce/zh_CN.js',
            //language: 'zh_CN',
            //皮肤
            skin: 'oxide',
            //隐藏技术支持
            branding: false,
            //隐藏底栏的元素路径
            elementpath: false,
            //关闭菜单
            menubar: false,
            //隐藏状态栏
            statusbar: false,
            //公式插件
            external_plugins: {
                zyoffice: root+'zyoffice/js/plugin/zyoffice.js',
                zywordexport: root+'zyoffice/js/plugin/zywordexport.js',
				zyofficepdf: root+'zyoffice/js/plugin/zyofficepdf.js'
            },
            //插件
            plugins: 'autoresize autolink autosave image imagetools paste preview ',
            //工具栏
            toolbar: 'bold italic underline forecolor fontselect fontsizeselect | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | tiny_mce_wiris_formulaEditor tiny_mce_wiris_formulaEditorChemistry | image zyoffice zywordexport zyofficepdf',
            //高度
            height: 200,
            //粘贴data格式的图像
            paste_data_images: true,
            width: '100%',
			setup:function(edt){}
        });
	</script>
</body>
</html>